Write description in waypoints in KML writer.
authorrobertl <robertl>
Sun, 21 Feb 2010 04:40:37 +0000 (04:40 +0000)
committerrobertl <robertl>
Sun, 21 Feb 2010 04:40:37 +0000 (04:40 +0000)
kml.c
reference/earth-expertgps.kml

diff --git a/kml.c b/kml.c
index c35a367562a6861a0d11519590eaa1bb424f23b5..3760a993d87ea2626778853d8f025c54d0f8251c 100644 (file)
--- a/kml.c
+++ b/kml.c
@@ -1011,7 +1011,10 @@ static void kml_waypt_pr(const waypoint *waypointp)
 
                kml_write_xml(0, "</description>\n");
                xfree(odesc);
-       }
+       } else {
+         if (strcmp(waypointp->shortname, waypointp->description))
+           kml_write_xmle("description", waypointp->description);
+        }
 
        // Timestamp
        kml_output_timestamp(waypointp);
index fad110ca9df78b5310d7ee42320256fc14956582..6f4a0241b4a7698c5d09efc548e0648155063cfe 100644 (file)
       </Placemark>
       <Placemark>
         <name>6006</name>
+        <description>600698</description>
         <TimeStamp><when>2001-06-02T03:26:55Z</when></TimeStamp>
         <styleUrl>#waypoint</styleUrl>
         <Point>
       </Placemark>
       <Placemark>
         <name>BEAR HILL</name>
+        <description>BEAR HILL TOWER</description>
         <TimeStamp><when>2001-06-02T03:27:03Z</when></TimeStamp>
         <styleUrl>#waypoint</styleUrl>
         <Point>
       </Placemark>
       <Placemark>
         <name>6016</name>
+        <description>Bike Loop Connector</description>
         <TimeStamp><when>2001-11-28T21:05:28Z</when></TimeStamp>
         <styleUrl>#waypoint</styleUrl>
         <Point>
       </Placemark>
       <Placemark>
         <name>5236BRIDGE</name>
+        <description>Bridge</description>
         <TimeStamp><when>2001-06-02T03:26:59Z</when></TimeStamp>
         <styleUrl>#waypoint</styleUrl>
         <Point>
       </Placemark>
       <Placemark>
         <name>5376BRIDGE</name>
+        <description>Bridge</description>
         <TimeStamp><when>2001-06-02T03:27:01Z</when></TimeStamp>
         <styleUrl>#waypoint</styleUrl>
         <Point>
       </Placemark>
       <Placemark>
         <name>6181CROSS</name>
+        <description>Crossing</description>
         <TimeStamp><when>2001-06-02T03:27:05Z</when></TimeStamp>
         <styleUrl>#waypoint</styleUrl>
         <Point>
       </Placemark>
       <Placemark>
         <name>6042CROSS</name>
+        <description>Crossing</description>
         <TimeStamp><when>2001-06-02T03:27:05Z</when></TimeStamp>
         <styleUrl>#waypoint</styleUrl>
         <Point>
       </Placemark>
       <Placemark>
         <name>DARKHOLLPO</name>
+        <description>Dark Hollow Pond</description>
         <styleUrl>#waypoint</styleUrl>
         <Point>
           <coordinates>-71.103646,42.458516,0.000000</coordinates>
       </Placemark>
       <Placemark>
         <name>6121DEAD</name>
+        <description>Dead End</description>
         <TimeStamp><when>2001-06-02T03:26:57Z</when></TimeStamp>
         <styleUrl>#waypoint</styleUrl>
         <Point>
       </Placemark>
       <Placemark>
         <name>5179DEAD</name>
+        <description>Dead End</description>
         <TimeStamp><when>2001-06-02T03:26:59Z</when></TimeStamp>
         <styleUrl>#waypoint</styleUrl>
         <Point>
       </Placemark>
       <Placemark>
         <name>5299DEAD</name>
+        <description>Dead End</description>
         <TimeStamp><when>2001-06-02T03:27:01Z</when></TimeStamp>
         <styleUrl>#waypoint</styleUrl>
         <Point>
       </Placemark>
       <Placemark>
         <name>5376DEAD</name>
+        <description>Dead End</description>
         <TimeStamp><when>2001-06-02T03:27:02Z</when></TimeStamp>
         <styleUrl>#waypoint</styleUrl>
         <Point>
       </Placemark>
       <Placemark>
         <name>6353DEAD</name>
+        <description>Dead End</description>
         <TimeStamp><when>2001-06-02T03:27:03Z</when></TimeStamp>
         <styleUrl>#waypoint</styleUrl>
         <Point>
       </Placemark>
       <Placemark>
         <name>6155DEAD</name>
+        <description>Dead End</description>
         <TimeStamp><when>2001-06-02T03:27:04Z</when></TimeStamp>
         <styleUrl>#waypoint</styleUrl>
         <Point>
       </Placemark>
       <Placemark>
         <name>GATE14</name>
+        <description>Gate 14</description>
         <TimeStamp><when>2001-06-02T03:26:59Z</when></TimeStamp>
         <styleUrl>#waypoint</styleUrl>
         <Point>
       </Placemark>
       <Placemark>
         <name>GATE16</name>
+        <description>Gate 16</description>
         <TimeStamp><when>2001-06-02T03:27:00Z</when></TimeStamp>
         <styleUrl>#waypoint</styleUrl>
         <Point>
       </Placemark>
       <Placemark>
         <name>GATE17</name>
+        <description>Gate 17</description>
         <TimeStamp><when>2001-06-02T03:27:01Z</when></TimeStamp>
         <styleUrl>#waypoint</styleUrl>
         <Point>
       </Placemark>
       <Placemark>
         <name>GATE19</name>
+        <description>Gate 19</description>
         <TimeStamp><when>2001-06-02T03:27:02Z</when></TimeStamp>
         <styleUrl>#waypoint</styleUrl>
         <Point>
       </Placemark>
       <Placemark>
         <name>GATE21</name>
+        <description>Gate 21</description>
         <TimeStamp><when>2001-06-02T03:27:03Z</when></TimeStamp>
         <styleUrl>#waypoint</styleUrl>
         <Point>
       </Placemark>
       <Placemark>
         <name>GATE24</name>
+        <description>Gate 24</description>
         <TimeStamp><when>2001-06-02T03:27:03Z</when></TimeStamp>
         <styleUrl>#waypoint</styleUrl>
         <Point>
       </Placemark>
       <Placemark>
         <name>GATE5</name>
+        <description>Gate 5</description>
         <TimeStamp><when>2001-11-28T21:05:28Z</when></TimeStamp>
         <styleUrl>#waypoint</styleUrl>
         <Point>
       </Placemark>
       <Placemark>
         <name>GATE6</name>
+        <description>Gate 6</description>
         <TimeStamp><when>2001-11-07T23:53:41Z</when></TimeStamp>
         <styleUrl>#waypoint</styleUrl>
         <Point>
       </Placemark>
       <Placemark>
         <name>6077LOGS</name>
+        <description>Log Crossing</description>
         <TimeStamp><when>2001-06-02T00:18:16Z</when></TimeStamp>
         <styleUrl>#waypoint</styleUrl>
         <Point>
       </Placemark>
       <Placemark>
         <name>5148NANEPA</name>
+        <description>Nanepashemet Road Crossing</description>
         <TimeStamp><when>2001-11-07T23:53:41Z</when></TimeStamp>
         <styleUrl>#waypoint</styleUrl>
         <Point>
       </Placemark>
       <Placemark>
         <name>5267OBSTAC</name>
+        <description>Obstacle</description>
         <TimeStamp><when>2001-06-02T03:27:00Z</when></TimeStamp>
         <styleUrl>#waypoint</styleUrl>
         <Point>
       </Placemark>
       <Placemark>
         <name>PANTHRCAVE</name>
+        <description>Panther Cave</description>
         <TimeStamp><when>2001-11-07T23:53:41Z</when></TimeStamp>
         <styleUrl>#waypoint</styleUrl>
         <Point>
       </Placemark>
       <Placemark>
         <name>5252PURPLE</name>
+        <description>Purple Rock Hill</description>
         <TimeStamp><when>2001-11-07T23:53:41Z</when></TimeStamp>
         <styleUrl>#waypoint</styleUrl>
         <Point>
       </Placemark>
       <Placemark>
         <name>5287WATER</name>
+        <description>Reservoir</description>
         <TimeStamp><when>2001-06-02T03:27:01Z</when></TimeStamp>
         <styleUrl>#waypoint</styleUrl>
         <Point>
       </Placemark>
       <Placemark>
         <name>5239ROAD</name>
+        <description>Road</description>
         <TimeStamp><when>2001-06-02T03:27:00Z</when></TimeStamp>
         <styleUrl>#waypoint</styleUrl>
         <Point>
       </Placemark>
       <Placemark>
         <name>5278ROAD</name>
+        <description>Road</description>
         <TimeStamp><when>2001-06-02T03:27:01Z</when></TimeStamp>
         <styleUrl>#waypoint</styleUrl>
         <Point>
       </Placemark>
       <Placemark>
         <name>5058ROAD</name>
+        <description>ROAD CROSSING</description>
         <TimeStamp><when>2001-06-02T00:18:14Z</when></TimeStamp>
         <styleUrl>#waypoint</styleUrl>
         <Point>
       </Placemark>
       <Placemark>
         <name>SHEEPFOLD</name>
+        <description>Sheepfold Parking Lot</description>
         <TimeStamp><when>2001-06-02T00:18:13Z</when></TimeStamp>
         <styleUrl>#waypoint</styleUrl>
         <Point>
       </Placemark>
       <Placemark>
         <name>SOAPBOX</name>
+        <description>Soap Box Derby Track</description>
         <TimeStamp><when>2001-06-02T03:27:04Z</when></TimeStamp>
         <styleUrl>#waypoint</styleUrl>
         <Point>
       </Placemark>
       <Placemark>
         <name>5376STREAM</name>
+        <description>Stream Crossing</description>
         <TimeStamp><when>2001-11-07T23:53:41Z</when></TimeStamp>
         <styleUrl>#waypoint</styleUrl>
         <Point>
       </Placemark>
       <Placemark>
         <name>5144SUMMIT</name>
+        <description>Summit</description>
         <TimeStamp><when>2001-11-28T21:05:28Z</when></TimeStamp>
         <styleUrl>#waypoint</styleUrl>
         <Point>
       </Placemark>
       <Placemark>
         <name>5150TANK</name>
+        <description>WATER TANK</description>
         <TimeStamp><when>2001-06-02T00:18:16Z</when></TimeStamp>
         <styleUrl>#waypoint</styleUrl>
         <Point>